
import time

'''#高阶函数
def bar():
    time.sleep(3)
    print("in the bar")

def test(func):
    start_time=time.time()
    func()  #其实就是func=bar,运行bar
    stop_time=time.time()
    print("the func run time is %s"%(stop_time-start_time))
test(bar)#打印内存地址
bar()'''

def bar():
    time.sleep(3)
    print("in the bar")

def test1(func):
    print(func)
    return func

# print(test1(bar))
# t = test1(bar)
# t()  #run bar
bar = test1(bar)
bar()